package com.zcy.gift.job;

import com.xxl.job.core.handler.annotation.XxlJob;
import com.zcy.gift.service.IShopCarService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

/**
 * <p>
 *
 * </p>
 *
 * @author lucker
 * @date 2024/2/22 9:56
 */
@Component
public class ShopCarDataSyncHandler {

    @Autowired
    private IShopCarService shopCarService;


    @XxlJob("shopCar-data-sync-job")
    public void syncData() {
        System.out.println("=====================开始将购物车信息同步到数据库=====================");
        shopCarService.dataSync();
        System.out.println("=========================购物车信息同步完成=========================");
    }
}
